using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;

using Atomic.Libraries;
using Atomic.Structures;

namespace Atomic.Clusters.Fitting
{
	[Serializable]
	public class AutomaticClusterExpansionNextStructureEventArgs : CancelEventArgs
	{
		public AutomaticClusterExpansionNextStructureEventArgs(Structure structure, IEnumerable<StructureMapping> currentEnergies)
		{
			Structure = structure;
			CurrentEnergies = new ReadOnlyList<StructureMapping>(currentEnergies);
			Error = false;
		}
	
		/// <summary>
		/// The structure to be computed.
		/// </summary>
		public Structure Structure
		{
			get;
			private set;
		}

		/// <summary>
		/// Directory used by corrdump for this structure. This may be passed on to VASP.
		/// </summary>
		public DirectoryInfo Directory
		{
			get;
			private set;
		}

		/// <summary>
		/// Currently generated structures (excluding this structure) and corresponding energies.
		/// </summary>
		public ReadOnlyList<StructureMapping> CurrentEnergies
		{
			get;
			private set;
		}

		/// <summary>
		/// Setting this indicates and error during structure energy computation.
		/// </summary>
		public bool Error
		{
			get;
			set;
		}
	}
}
